package core

import (
	"github.com/gin-gonic/gin"

	_ "away.wei/minidevpos/docs"
)

type GinRouter struct {
	IGinRouter
}

func (*GinRouter) AddPrivateRouter(router *gin.RouterGroup) {
	router.GET("/test", demoApi.Test)
	router.POST("/server", serverApi.Create)
	router.DELETE("/server", serverApi.Delete)
	router.PUT("/server", serverApi.Update)
	router.GET("/server/getpage", serverApi.GetPage)
	router.GET("/server/getselectrows", serverApi.GetSelectRows)

	router.POST("/configration", configrationApi.Create)
	router.DELETE("/configration", configrationApi.Delete)
	router.PUT("/configration", configrationApi.Update)
	router.GET("/configration/getbyname", configrationApi.GetByName)
	router.GET("/configration/getpage", configrationApi.GetPage)

	router.POST("/project", projectApi.Create)
	router.DELETE("/project", projectApi.Delete)
	router.PUT("/project", projectApi.Update)
	router.GET("/project/details", projectApi.Details)
	router.GET("/project/getpage", projectApi.GetPage)

	router.DELETE("/project/task", projectTaskApi.Delete)
	router.GET("/project/task/cancel", projectTaskApi.Cancel)
	router.GET("/project/task/add", projectTaskApi.Add)
	router.GET("/project/task/getpage", projectTaskApi.GetPageByProjectId)

	router.POST("/project/builder", projectBuildApi.Create)
	router.DELETE("/project/builder", projectBuildApi.Delete)
	router.PUT("/project/builder", projectBuildApi.Update)
	router.GET("/project/builder", projectBuildApi.GetProjectId)

	router.POST("/project/deployer", projectDeployApi.Create)
	router.DELETE("/project/deployer", projectDeployApi.Delete)
	router.PUT("/project/deployer", projectDeployApi.Update)
	router.GET("/project/deployer", projectDeployApi.GetProjectId)
}

func (*GinRouter) AddPublicRouter(router *gin.RouterGroup) {

}
